import {createRouter, createWebHashHistory} from 'vue-router'

export default createRouter({
    history:createWebHashHistory(),
    routes: [
        {
            path: '/',
            name: 'Home',
            redirect: 'Index',
        },
        {
            path: '/index',
            name: 'Index',
            redirect: '/home',
            component: ()=>import('../views/Home/index.vue'),
            children: [
              {
                path: '/404',
                name: 'PageNotFound',
                component: ()=>import('../views/Error/404.vue')
            },
            {
              path: '/502',
              name: 'BadGateway',
              component: ()=>import('../views/Error/502.vue')
          },
          {
                    path: '/home',
                    name: 'MainHome',
                    component: ()=>import('../views/Home/home.vue')
                }
            ]
        },
        {
            path: '/login',
            name: 'Login',
            component: ()=>import('../views/Login/index.vue')
        },
        

        

    ]
})